<%@page import="com.hotel.test.service.RomTypeLocalServiceUtil"%>
<%@page import="com.hotel.test.model.RomType"%>
<%@page import="java.util.List"%>
<%@page import="com.hotel.test.service.LocalLocalServiceUtil"%>
<%@page import="com.hotel.test.service.HotelLocalServiceUtil"%>
<%@page import="com.hotel.test.model.Hotel"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%
	String url = (String) request.getAttribute("url");
	String hotelId = request.getParameter("hotelId");
	if(hotelId == null)
	{
		%>
		<h1>Khong tim thay khach san</h1>
		<%
	}
	
	else
	{
		Hotel hotel = HotelLocalServiceUtil.getHotel(Long.parseLong(hotelId));
		%>
			<h2>Thong tin ve khach san <%=hotel.getHotelName() %></h2>
			 <p>Dia Diem : <%=LocalLocalServiceUtil.getLocal(hotel.getLocalId()).getLocalName() %></p>  
			<p>chat luong : <%=hotel.getQuality() %> sao</p>
			<p>Mo ta :</p>
			<p><%=hotel.getIntroduce() %></p>
			<p>anh dai dien : <%=hotel.getImage() %></p>


<h3>Cac Kieu phong cua khach san</h3>
<%
	List<RomType> rooms = RomTypeLocalServiceUtil.getByHotelId(hotel.getHotelId());
	if(rooms == null || rooms.isEmpty())
	{
		%>
			<h4>Khong co kieu phong nao </h4>
		<%
	}
	
	else
	{
		%>
		<div id="list_room_type">
			<%
			for(RomType room : rooms)
			{
				%>
				<div id="room_item">
					<p>Kieu phong: <%=room.getRoomName() %></p>
					<p>Mo ta : <%=room.getInformation() %></p>
					<p>Gia : <%=room.getRice() %></p>
				</div>
				<%
			}
			%>
		</div>
		<%
	}
%>


		<%
	}
%>
</body>
</html>